Current Location: Home> Function Categories> sqrt

sqrt

Square root
Name:sqrt
Category:math
Programming Language:php
One-line Description:Square root.

Definition and usage

sqrt() function returns the square root of a number.

Example

In this example, we will return the square root of different numbers:

 <?php
echo ( sqrt ( 0 ) ) ;
echo ( sqrt ( 1 ) ) ;
echo ( sqrt ( 9 ) ) ;
echo ( sqrt ( 0.64 ) ) ;
echo ( sqrt ( - 9 ) ) ;
?>

Try it yourself

grammar

 sqrt ( x )
parameter describe
x Required. A number.

illustrate

Returns the square root of x .

Similar Functions
  • Ancient sine asin

    asin

    Ancientsine
  • Exponential expressions pow

    pow

    Exponentialexpressio
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Absolute value abs

    abs

    Absolutevalue
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Convert decimal to octal decoct

    decoct

    Convertdecimaltoocta
  • Reverse cosine acos

    acos

    Reversecosine
Popular Articles